import http from "../../utils/http";
import { ElderlyParams, ElderlyRecord, ResponseElderly, Schedule, ScheduleList, TaskList } from "./type";

export const getElderlyList=(params:ElderlyParams)=>{

    return  http.get<ResponseElderly>("/api/elderly/list",params);
  
  }


  export const getFileItems=()=>{

    return  http.get<any>("/api/fileitems/list");
  
  }
  export const getElderlyFiles=(id:number)=>{

    return  http.get<any>(`/api/elderlyFiles/list/${id}`);
  
  }
  
  export const elderlyFilesAdd=(data:ElderlyRecord)=>{

    return  http.post<any>(`/api/elderlyFiles/add`,data);
  
  }
  export const getElderlySchedule=(id:number)=>{

    return  http.get<ScheduleList>(`/api/schedule/list/${id}`);
  
  }
  
  export const deleteSchedule=(id:number)=>{

    return  http.delete<null>(`/api/schedule/delete/${id}`);
  
  }
  export const getElderlyTask=(id:number)=>{

    return  http.get<TaskList>(`/api/elderlyTask/getTask/${id}`);
  
  }

 